﻿using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, Size=1)]
public struct myapi
{
    [DllImport("user32", EntryPoint="SetWindowLong")]
    public static extern int SetWindowLongA(int hwnd, int nIndex, int dwNewLong);
    [DllImport("User32.dll")]
    public static extern int SendMessage(int hwnd, int msg, int wParam, ref COPYDATASTRUCT IParam);
    [DllImport("User32.dll")]
    public static extern int FindWindow(string lpClassName, string lpWindowName);

    [DllImport("WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
    extern static public int WXSaveVoiceMsg(uint pid, string path);
}

